The present invention relates to the virtualization technology, and more specifically, to a method and an apparatus for establishing redundant connections for a virtual machine.
In a distributed network such as a cloud computing network, there are generally two types of nodes, i.e. compute nodes and storage nodes. The compute node may provide computing resources necessary to provision a virtual machine, such as a CPU and memory, and the storage node can store and provide a virtual machine image. With respect to the storage node, the compute node is a client device.
When provisioning a virtual machine on a compute node, it is necessary to load the virtual machine image to complete the initial configuration of the virtual machine system. Therefore, it is necessary to establish a connection between the compute node and the storage node to transmit the virtual machine image.
In the prior art, an Internet Small Computer System Interface (iSCSI) protocol can be used to establish the connection between the compute node and the storage node. The iSCSI protocol can implement mass data package and reliable transmission between a host system (an initiator) and a storage device (a target) over an IP network.
For high availability of the virtual machine, typically, the same virtual machine image is stored on a plurality of storage nodes. The compute node can select any storage node to establish an iSCSI connection, so as to access the storage node to obtain the virtual machine image.
However, such a connection is susceptible to a network. If any node in the connection fails, the connection will be disconnected, thereby resulting in virtual machine crashes.
Furthermore, when a plurality of storage nodes that store the same virtual machine image are available, how to select the most appropriate storage node to provide the virtual machine image is also an important issue.